export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'JiYi Electronics Technology Co., Ltd',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  server: {
    port: 5000 // 指定新的端口号
  },
  loading: {
    color: "red",
    height: "3px"
  },
  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'element-ui/lib/theme-chalk/index.css',
    { src: '@/assets/css/reset.scss',lang:'scss'}
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    { src: "@/plugins/vue-swiper.js", ssr: false },
    { src: "@/plugins/elementUI.js", ssr: true },
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    extend(config, ctx) {
    },
    vendor: ['element-ui']
  },
  router: {
    extendRoutes(routes, resolve) {
      routes.push({
        path: '/',
        name: 'index',
        component: resolve(__dirname, 'pages/home/index.vue')
      },
      {
        path: '/aboutUs',
        name: 'aboutUs',
        component: resolve(__dirname, 'pages/aboutUs/index.vue')
      },
      {
        path: '/productService',
        name: 'productService',
        component: resolve(__dirname, 'pages/productService/index.vue')
      },
      {
        path: '/breed',
        name: 'breed',
        component: resolve(__dirname, 'pages/breed/index.vue')
      },
      {
        path: '/stock',
        name: 'stock',
        component: resolve(__dirname, 'pages/stock/index.vue')
      },
      {
        path: '/contactUs',
        name: 'contactUs',
        component: resolve(__dirname, 'pages/contactUs/index.vue')
      },
      )
    }
  }
}
